#include <string>
#include <limits>
#include <map>

class Result
{
public:
  Result() {
    total_ncalls = cum_ncalls = 0;
    total_time = cum_time = 0.0;
    total_percall = cum_percall = 0.0;
    whole[0] = pure[0] = 0.0;
    whole[1] = pure[1] = std::numeric_limits<double>::max();
  }

public:
  int total_ncalls;
  int cum_ncalls;
  double total_time;
  double cum_time;
  double total_percall;
  double cum_percall;
  double whole[2];
  double pure[2];
};

typedef std::string FuncName;
typedef std::map<FuncName, Result> ResultType;

ResultType time_analyze(const std::string& file_name);
